import { defineConfig } from 'vite';
import uni from '@dcloudio/vite-plugin-uni';

export default defineConfig({
    plugins: [uni()],
    server: {
        proxy: {
            '/server': {
                target: 'http://dev.fepft.com',
                changeOrigin: true,
                rewrite: (path) => {
                    const pathPart = path.replace('/server/', '');
                    return `/index.php?g=App&m=Diyapp&a=${pathPart}`;
                }
            }
        }
    }
});    